#pragma once
#include <d3d9.h>	
#pragma comment(lib, "d3d9.lib")
#include <d3dx9.h>
#pragma comment(lib, "d3dx9.lib")
#include <dxerr.h>
#pragma comment(lib, "dxerr.lib")
#include <sstream>
using namespace std;

#include "Enums.h"
#include "Vector.h"
#include "Message.h"
#include "Structs.h"
#include "Mouse.hpp"


#ifdef _DEBUG
#ifndef HR

#define HR(x)					\
{								\
	HRESULT hr = x;				\
	if (FAILED(hr))				\
{							\
	DXTRACE_ERR(#x, hr);	\
	DebugBreak();			\
}							\
}
#endif
#else
#ifndef HR
#define HR(x) x;
#endif
#endif

//Degrees to radians
#define DEGTORAD(degree) ((D3DX_PI / 180.0f) * (degree))

//Code Controling defines
//Code not yet working fully
//#define _DEBUGGING
#ifdef _DEBUGGING
#define _IMPLEMENT_SWORD
#endif

//Client rect size
#define SCREEN_WIDTH			500
#define SCREEN_HEIGHT			500

//Used by the clock to determine how long a tick is
#define WAITTIME				.001

#define SCREENPOSITIONS			SCREEN_POS_SIZE

//Used to initialize and itterate through the mesh and texture list
const unsigned g_numMeshes = MESH_SIZE;
const unsigned g_numTextures = TEXTURE_SIZE;

extern bool CLIP;

//Determines how often an item will spawn during generations
//1 lowest 10 highest
const int SPAWN_RATE = 30;